<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" enctype="multipart/form-data" method="post">
                <input type="hidden" name="data['user_id']" value="<?= $user['id'] ?>">
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl"><{$tit}>管理</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">区域 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <select name="data[area_id]"
                                            data-am-selected="{searchBox: 1, btnSize: 'sm'}">
                                        <option value="0">顶级区域</option>
                                        <?php if (isset($area_list)): foreach ($area_list as $val): ?>
                                            <option value="<?= $val['id'] ?>"
                                                <?= $info['area_id'] == $val['id'] ? 'selected' : '' ?>
                                                <?= $info['id'] == $val['id'] ? 'disabled' : '' ?>>
                                                <?= $val['name_h1'] ?></option>
                                        <?php endforeach; endif; ?>
                                    </select>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">产品分类 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <select name="data[cate_id]"
                                            data-am-selected="{searchBox: 1, btnSize: 'sm'}">
                                        <option value="0">顶级产品</option>
                                        <?php if (isset($cate_list)): foreach ($cate_list as $val): ?>
                                            <option value="<?= $val['id'] ?>"
                                                <?= $info['cate_id'] == $val['id'] ? 'selected' : '' ?>
                                                <?= $info['id'] == $val['id'] ? 'disabled' : '' ?>>
                                                <?= $val['name_h1'] ?></option>
                                        <?php endforeach; endif; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">产品用户名 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="data[username]"
                                           value="<?= $info['username'] ?>" placeholder="请输入姓名" required>
                                </div>
                            </div>
                            <{if $user}>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">客户姓名 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="data[realname]"
                                           value="<?= $user['realname'] ?>" placeholder="请输入姓名" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">客户电话 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="data[tel]"
                                           value="<?= $user['tel'] ?>" placeholder="请输入电话" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">公司 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="data[company]"
                                           value="<?= $user['company'] ?>" placeholder="请输入公司" >
                                </div>
                            </div>
                            <{/if}>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label ">付款日期 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="data[pay_time]"
                                           value="<?= $info['pay_time'] ?>" placeholder="请输入付款日期" data-am-datepicker>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">付款方式 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <{html_radios1("data[pay_bank]",$bankRadio,$info.pay_bank)}>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label ">付款金额 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="data[pay_money]"
                                           value="<?= $info['pay_money'] ?>" placeholder="请输入付款金额" >
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label ">尾款金额 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="data[wei_money]"
                                           value="<?= $info['wei_money'] ?>" placeholder="请输入尾款金额">
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label ">备注 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <textarea rows="2" name="data[intro]" placeholder="请输入订单备注"
                                        class="am-field-valid"></textarea>
                                </div>
                            </div>
                            <!-- <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">排序 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="data[sort]"
                                           value="<?= $info['sort'] ?>" required>
                                    <small>数字越小越靠前</small>
                                </div>
                            </div> -->
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">状态 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <{html_radios1("data[status]",$statusRadio,$info.status)}>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {

        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();

    });
</script>
